source("funcs_and_cons.R")

## ability and participation cost distribution

sol <- fread(paste0(dir.generated,'matlab/Calibration/',calibration_version,'_abilityDistThreeFixC_sol.csv'))
cons <- fread(paste0(dir.raw,'constants.csv'))
prod_fun <- fread(paste0(dir.generated,'matlab/Calibration/',calibration_version,'_KrusellRobotsEach_sol.csv'))

par.epsilon <- rnd2(cons$epsilon[1])

par.sigmaM <- rnd2(sol$sigmaM[1])
par.sigmaR <- rnd2(sol$sigmaR[1])
par.sigmaC <- rnd2(sol$sigmaC[1])
par.aM <- rnd2(sol$aM[1])
par.aR <- rnd2(sol$aR[1])
par.aC <- rnd2(sol$aC[1])

par.tau_hsv <- sol$tau_hsv[1]
par.lambda_hsv <- sol$lambda_hsv[1]

par.mu_part <- rnd2(sol$mu_part_M[1])

par.sigma_part <- rnd2(sol$sigma_part_M[1])

par.xi <- rnd2(sol$xi[1])

# scaling transfer
par.iota <- sol$iota[1]
par.transfer <- rnd2(sol$transfer[1] * par.iota / 1000)

inequ <- fread(paste0(dir.generated,'matlab/Calibration/inequ_par.csv'))

par.inequ <- rnd2(inequ$inequ_par[1])

par.tau_E <- rnd2(prod_fun$tau_E[1]*100)
par.tau_S <- rnd2(prod_fun$tau_S[1]*100)
